Skip to content

TD-8001: Bump @jupiterone/query-language-parser to ^6.3.20 - #146

Closed
jmountifield wants to merge 2 commits into
mainfrom
td-8001/bump-query-language-parser
Closed

TD-8001: Bump @jupiterone/query-language-parser to ^6.3.20#146
jmountifield wants to merge 2 commits into
mainfrom
td-8001/bump-query-language-parser

Conversation

@jmountifield

@jmountifield jmountifield commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bumps @jupiterone/query-language-parser to ^6.3.20
  • Required for scalars in subqueries feature support (parser fix in v6.3.20)
  • Customers cannot save queries using scalar function returns in subqueries without this update

Context

Test plan

  • Run npm install / yarn install to regenerate the lockfile
  • Verify the project builds successfully
  • Run existing tests to ensure no regressions
  • Verify query with scalar function returns in subqueries parses correctly

🤖 Generated with Claude Code

Update @jupiterone/query-language-parser to ^6.3.20 to support
the 'scalars in subqueries' feature.

Resolves: https://jupiterone.atlassian.net/browse/TD-8001
@jmountifield

Copy link
Copy Markdown
Contributor Author

CI Failure Analysis

Validation script fails: rule sbom-all-module-versions-used has an invalid query.

query0 is not a valid query.
Invalid RETURN selector: "displayName" is not a valid identifier. Valid identifiers are: parent, rel, cm

Root cause: Parser v6.3.18 (TD-7817) added RETURN/ORDER BY selector identifier validation. The rule's query uses displayName in a RETURN clause but the valid identifiers for that query are parent, rel, cm.

Fix needed: Update the rule's J1QL query to use a valid identifier (likely needs an alias or correct selector reference).

Change cm,displayName (comma) to cm.displayName (dot) in the RETURN
clause. The comma was causing the parser to interpret 'displayName' as
a separate invalid selector identifier.
@VDubber
VDubber marked this pull request as ready for review February 7, 2026 21:35
@VDubber
VDubber requested a review from a team as a code owner February 7, 2026 21:35
Copilot AI review requested due to automatic review settings February 7, 2026 21:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the query parser dependency to support scalar function returns in subqueries, and adjusts an SBOM rule-pack query to correct its RETURN field syntax.

Changes:

  • Bump @jupiterone/query-language-parser from ^4.5.0 to ^6.3.20
  • Fix the SBOM rule-pack query RETURN clause from cm,displayName to cm.displayName

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
rule-packs/jupiterone-sbom.json Fixes a malformed RETURN field reference in a stored query
package.json Updates the query language parser dependency to a version that includes the needed parser fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{
"name": "query0",
"query": "FIND (CodeRepo|CodeModule) AS parent THAT CONTAINS AS rel CodeModule AS cm RETURN parent.displayName, cm,displayName, rel.version",
"query": "FIND (CodeRepo|CodeModule) AS parent THAT CONTAINS AS rel CodeModule AS cm RETURN parent.displayName, cm.displayName, rel.version",

Copilot AI Feb 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change fixes the malformed cm,displayName token, but it also removes cm from the RETURN list (previously it returned cm and a separate displayName token). If any downstream consumer expects the full cm entity/object in results, this will be a breaking behavioral change. Consider returning both (e.g., include cm alongside cm.displayName) or confirm that only cm.displayName is required.

Suggested change
"query": "FIND (CodeRepo|CodeModule) AS parent THAT CONTAINS AS rel CodeModule AS cm RETURN parent.displayName, cm.displayName, rel.version",
"query": "FIND (CodeRepo|CodeModule) AS parent THAT CONTAINS AS rel CodeModule AS cm RETURN parent.displayName, cm, cm.displayName, rel.version",

Copilot uses AI. Check for mistakes.
Comment thread package.json
"author": "JupiterOne <dev@jupiterone.io>",
"devDependencies": {
"@jupiterone/query-language-parser": "^4.5.0",
"@jupiterone/query-language-parser": "^6.3.20",

Copilot AI Feb 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR updates package.json but does not include an updated lockfile. If this repo commits a lockfile (e.g., package-lock.json / yarn.lock / pnpm-lock.yaml), it should be regenerated and committed in the same PR to keep installs reproducible in CI and for consumers.

Copilot uses AI. Check for mistakes.
@VDubber VDubber closed this Feb 7, 2026
@VDubber

VDubber commented Feb 7, 2026

Copy link
Copy Markdown

The dependency is only a devDep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants